﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using CMS.BLL;
public partial class Controls_HomePage_ctrAboutUs : System.Web.UI.UserControl
{
    int nCurrentLanguage = Support.GetCurrentLanguage() - 1; 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.SetAboutUsContent();
        }
    }

    private void SetAboutUsContent()
    {
        
        StaticPages objStaticPages = new StaticPages();

        int nID = objStaticPages.GetIDbyPageCode("introduction");
        objStaticPages.LoadById(nID);
        lnkAboutUs.NavigateUrl = Config.ROOT + Pages.FrontEnds.INTRODUCTION + "?" + Config.PAGE_ID + "=" + nID;
        switch (nCurrentLanguage)
        { 
            case 1:
                lnkAboutUs.Text = ConvertData.ConvertToString(objStaticPages.Data.PageName1 ).ToUpper ();
                ltrAboutUs.Text = ConvertData.ConvertToString(objStaticPages.Data.InitContent1 ); 
                break;
            case 2:
                lnkAboutUs.Text = ConvertData.ConvertToString(objStaticPages.Data.PageName2).ToUpper();
                ltrAboutUs.Text = ConvertData.ConvertToString(objStaticPages.Data.InitContent2); 
                break;
            case 3:
                lnkAboutUs.Text = ConvertData.ConvertToString(objStaticPages.Data.PageName3).ToUpper();
                ltrAboutUs.Text = ConvertData.ConvertToString(objStaticPages.Data.InitContent3); 
                break;
        }
        
    }
    
}
